<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改课程信息</title>
    <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css" crossorigin="anonymous">
    <style>
        body {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            margin: 0;
        }

        /* 中间内容区域样式 */
        .middle-content {
            display: flex;
            flex: 1;
        }

        /* 内容区域样式 */
        .content {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
        }

        /* 表单样式 */
        .form-container {
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        .form-title {
            margin-bottom: 20px;
            text-align: center;
            color: #333;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-actions {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
        }
    </style>
</head>
<body>
<!-- 顶部导航栏 -->
<div th:replace="header.html"></div>

<!-- 中间内容区域 -->
<div class="middle-content">
    <!-- 侧边导航栏 -->
    <div th:replace="nav.html"></div>

    <!-- 主内容区 -->
    <div class="content">
        <div class="form-container">
            <h2 class="form-title">修改课程信息</h2>

            <form th:action="@{/Course/edit}" method="post">

                <input type="hidden" name="id" th:value="${course.id}">

                <div class="form-group">
                    <label for="name">课程</label>
                    <input type="text" class="form-control" id="name" name="name"
                           th:value="${course.name}" required>
                </div>

                <div class="form-group">
                    <label for="teacher_id">教师编号</label>
                    <input type="text" class="form-control" id="teacher_id" name="teacher_id"
                           th:value="${course.teacher_id}" required>
                </div>

                <div class="form-actions">
                    <button type="button" class="btn btn-secondary" onclick="window.history.back()">取消</button>
                    <button type="submit" class="btn btn-primary">保存修改</button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- 页脚 -->
<div th:replace="footer.html"></div>

<!-- 引入JS库 -->
<script src="/bootstrap/js/jquery.js" crossorigin="anonymous"></script>
<script src="/bootstrap/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
</body>
</html>